<template>
  <button :class="className" :open-type="openType">
    <slot />
  </button>
</template>

<script setup lang="ts">
import { WechatMiniButtonOpenType } from '@/common/constants'
type OpenType = keyof typeof WechatMiniButtonOpenType

interface ButtonProps {
  className?: string
  openType?: OpenType
}

defineProps<ButtonProps>()
</script>
<style scoped>
button {
  padding: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: 0;
  background-color: transparent;
  font-size: inherit;
  line-height: inherit;
}

button::after {
  border: 0;
  background-color: transparent;
}
</style>
